﻿using BielskoNoca.DAL.Abstract;
using BielskoNoca.DAL.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BielskoNoca.DAL.Concrete
{
    public class RunnerInfoRepository: IRunnerInfoRepository
    {
        private BielskoNocaDataEntities context ;

        public RunnerInfoRepository(BielskoNocaDataEntities context)
        {
            this.context = context;
        }

        public Models.Category GetById(int id)
        {
            return null;
        }

        public IQueryable<Models.RunnerInfo> Query
        {
            get { throw new NotImplementedException(); }
        }

        public Models.RunnerInfo GetFirstOrDefault(System.Linq.Expressions.Expression<Func<Models.RunnerInfo, bool>> whereCondition)
        {
            throw new NotImplementedException();
        }

        public int Add(Models.RunnerInfo entity)
        {
            RunnerInfo tEntity = this.context.RunnerInfoes.Add(entity);
            context.SaveChanges();

            return tEntity.Id;
        }

        public void Delete(Models.RunnerInfo entity)
        {
            throw new NotImplementedException();
        }

        public void Attach(Models.RunnerInfo entity)
        {
            throw new NotImplementedException();
        }

        public IList<Models.RunnerInfo> GetAll(System.Linq.Expressions.Expression<Func<Models.RunnerInfo, bool>> whereCondition)
        {
            throw new NotImplementedException();
        }

        public IList<Models.RunnerInfo> GetAll()
        {
            throw new NotImplementedException();
        }

        public long Count(System.Linq.Expressions.Expression<Func<Models.RunnerInfo, bool>> whereCondition)
        {
            throw new NotImplementedException();
        }

        public long Count()
        {
            throw new NotImplementedException();
        }
    }
}